package com.superzqb.asus.superzqbFragment.superzqbShopMain.Adapter;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.superzqb.asus.superzqb.R;
import com.superzqb.asus.superzqbUtil.MyItemClicklistener;

/**
 * Created by asus on 2017/3/9.
 */

public class ShopViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
    public ImageView img;
    public TextView tv;
    private MyItemClicklistener mListener;//
    public ShopViewHolder(View itemView,MyItemClicklistener listen) {
        super(itemView);
        img= (ImageView) itemView.findViewById(R.id.img);
        tv= (TextView) itemView.findViewById(R.id.name);
        this.mListener=listen;
        itemView.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if(mListener != null){
            mListener.onItemClick(v,getPosition());
        }
    }
}
